package com.ak.assets;

import com.ak.cluster.AssetIndex;
import com.ak.cluster.GameObject;
import com.ak.cluster.GameWorld;


public class Floor extends GameObject {
	
	boolean isVisible;
	int headPosition;
	int tailPosition;
	int spacer;
	public GameWorld mWorld;
	public Floor(GameWorld world)
	{
		super();
		mWorld = world;
		textureID = 3;
		assetTexture = assignTexture(AssetIndex.orangeFloorTexture);
		scale.x = 1;
		scale.y = 1;
		position.x = 0;
		position.y = -16;
		chosenRenderSetting = RenderOptions.SOLID.code;
		assetMesh = buildMesh(assetMesh, assetTexture);
		
		//From Constructor
		
		chosenBodyType = PhysicsBodyOptions.STATIC.code;

		//To Renderer
		
		world.addObject(this);
		
	}
	@Override 
	public void update()
	{
//		if(mWorld.worldCamera.position.x >= headPosition)
//		{
//			headPosition+=512;
//			tailPosition+=512;
//			spacer+=512;
//		}
//		if(mWorld.worldCamera.position.x <= tailPosition)
//		{
//			tailPosition-=512;
//			headPosition-=512;
//			spacer -=512;
//		}
		//position = objectBody.getPosition();

	}
	@Override
	protected void dispose() {
		// TODO Auto-generated method stub
		assetTexture.dispose();
		assetMesh.dispose();
	}
}
